#ifndef SEATDETECTION_H
#define SEATDETECTION_H
#include <QString>
#include <QVector>
#include <QXmlStreamReader>
#include <QXmlStreamWriter>
#include <QFile>
#include <QJsonDocument>
#include <QJsonArray>
#include <QJsonObject>
#include <QJsonValue>

#include "imageinfo.h"
#include "cnninfo.h"
#include "camerainfo.h"
#include "categoryinfo.h"
#include "detectionwindowinfo.h"
#include "../description/description.h"

class SeatDetection
{
public:
    SeatDetection();

private:
    ImageInfo               m_objImageInfo;
    CnnInfo                 m_objCnnInfo;
    QVector<CameraInfo>     m_vecCameraInfos;
    QVector<CategoryInfo>   m_vecCategoryInfos;
    DetectionWindowInfo     m_objDetectionWindowInfo;
    Description             m_objDescription;

public:
    ImageInfo&              GetImageInfo();
    CnnInfo&                GetCnnInfo();
    DetectionWindowInfo&    GetDetectionWindowInfo();
    Description&            GetDescription();

public:
    bool writeXML(const QString &filePath);
    bool ReadXML(const QString &filePath);
    bool writeJSON(const QString &filePath);
    bool readJSON(const QString &filePath);

private:
    bool ReadCamerasXML(QXmlStreamReader &reader);
    bool ReadCategoriesXML(QXmlStreamReader &reader);
};

#endif // SEATDETECTION_H
